;********************** ;* RoboTask Task file * ;* Do not edit! * ;********************** [Root] ActionAfterRun=INTEGER|0 Actions=FOLDER Automat=INTEGER|0 CatID=INTEGER|0 ContinueOnError=INTEGER|0 ExternalName=STRING|"Task68" Hide=INTEGER|0 ID=INTEGER|797530940 LocalVariables=STRING|"PARAMETER_A,PARAMETER_B,PARAMETER_C" Name=STRING|"[DEMO.BASIC] Quadratic Equation" Priority=INTEGER|3 RunOnClose=INTEGER|0 RunOnStartup=INTEGER|0 ToLog=INTEGER|3 LogOnAsUser=INTEGER|0 [Actions] Action1=FOLDER Action2=FOLDER Action3=FOLDER Action4=FOLDER Action5=FOLDER [Actions\Action1] ActionID=STRING|"A_DIALOG_MESSAGE" Enabled=INTEGER|-1 Name=STRING|"Show ""This task helps you solve quadratic equation""" Params=FOLDER [Actions\Action1\Params] icon=STRING|"1" msg0=STRING|"This task helps you solve quadratic equation" msg1=STRING|"A(x^2)+Bx+C=0" msgcount=STRING|"2" playsound=STRING|"0" showmessage=STRING|"1" [Actions\Action2] ActionID=STRING|"A_DIALOG_INPUTBOX" Enabled=INTEGER|-1 Name=STRING|"Input Box" Params=FOLDER [Actions\Action2\Params] default=STRING|"0" prompt=STRING|"Enter coefficient A:" variable=STRING|"PARAMETER_A" [Actions\Action3] ActionID=STRING|"A_DIALOG_INPUTBOX" Enabled=INTEGER|-1 Name=STRING|"Input Box" Params=FOLDER [Actions\Action3\Params] default=STRING|"0" prompt=STRING|"Enter coefficient B:" variable=STRING|"PARAMETER_B" [Actions\Action4] ActionID=STRING|"A_DIALOG_INPUTBOX" Enabled=INTEGER|-1 Name=STRING|"Input Box" Params=FOLDER [Actions\Action4\Params] default=STRING|"0" prompt=STRING|"Enter coefficient C:" variable=STRING|"PARAMETER_C" [Actions\Action5] ActionID=STRING|"BASIC_SCRIPT" Enabled=INTEGER|-1 Name=STRING|"Basic Script" Params=FOLDER [Actions\Action5\Params] line00000=STRING|"Sub Main" line00001=STRING|" Dim a As Double" line00002=STRING|" Dim b As Double" line00003=STRING|" Dim c As Double" line00004=STRING|" Dim d As Double" line00005=STRING|" Dim x1 As Double" line00006=STRING|" Dim x2 As Double" line00007=STRING|" Dim s As String" line00009=STRING|" a = Val (RoboTaskApp.ExpandText(""{Parameter_a}""))" line00010=STRING|" b = Val (RoboTaskApp.ExpandText(""{Parameter_b}""))" line00011=STRING|" c = Val (RoboTaskApp.ExpandText(""{Parameter_c}""))" line00013=STRING|" If a=0 Then" line00014=STRING|" MsgBox(""It is a linear equation!"")" line00015=STRING|" End" line00016=STRING|" End If" line00018=STRING|" d = (b*b)-(4*a*c)" line00019=STRING|" If d<0 Then" line00020=STRING|" MsgBox(""Discriminant < 0! Equation haven't solutions"")" line00021=STRING|" End" line00022=STRING|" End If" line00024=STRING|" x1 = (- b - Sqr(d))/(2*a)" line00025=STRING|" x2 = (- b + Sqr(d))/(2*a)" line00027=STRING|" s = ""Equation:""+Chr(10)+Str(a)+""(x^2)""" line00028=STRING|" If b>=0 Then" line00029=STRING|" s = s + ""+""+Str(b)+""x""" line00030=STRING|" Else" line00031=STRING|" s = s +Str(b)+""x""" line00032=STRING|" End If" line00033=STRING|" If c>=0 Then" line00034=STRING|" s = s + ""+""+Str(c) +""=0""" line00035=STRING|" Else" line00036=STRING|" s = s + Str(c) +""=0""" line00037=STRING|" End If" line00038=STRING|" s = s +Chr(10)+""Solutions:""+Chr(10)+""X1=""+Str(x1)+Chr(10)+""X2=""+Str(x2)" line00039=STRING|" MsgBox(s)" line00040=STRING|"End Sub" linecount=STRING|"41" source=STRING|"0"